<%--
  Created by IntelliJ IDEA.
  User: Joshua
  Date: 7/17/12
  Time: 5:56 PM
  User Login page for Squire. Will redirect if the user is already logged in.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>Welcome to Squire</title>
</head>
<body>
<div class="wrapper">
    <div class="header">
        <h1>Welcome to Squire</h1>
    </div>
    <table class="body">
        <tr>
            <td id="newsHeader"><h2>News</h2></td>
        </tr>
        <tr>
            <td id="newsBody">
                <h3>Tuesday July 17th, 2012 at 6:09 pm:</h3>
                <p>First update! How exciting!!! This is a login page!</p>
            </td>
            <td id="loginBox">
                <form name="login" id="login" method="post" action="/login.jsp">
                    Username:<br />
                    <input name="userid" type="text" /><br />
                    Password:<br />
                    <input name="password" type="password" />
                    <input type="submit" value="login" />
                </form>
            </td>
            <c:choose>
                <c:when test="${requestScope.failedLogin}">
                    <td class="error">
                        Unrecognized username or password.
                    </td>
                </c:when>
            </c:choose>
        </tr>
    </table>
</div>
</body>
</html>